$OpenBSD: patch-bin_MailScanner,v 1.11 2015/04/09 19:55:09 sthen Exp $
--- bin/MailScanner.orig	Wed Feb 25 06:38:27 2015
+++ bin/MailScanner	Fri Mar 13 03:49:09 2015
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -U -I/opt/MailScanner/lib
+#!/usr/bin/perl -U -I%PREFIX%/lib/MailScanner
 #
 #   MailScanner - SMTP E-Mail Virus Scanner
 #   Copyright (C) 2002  Julian Field
@@ -73,7 +73,7 @@ BEGIN {
   # of each element
   foreach $path (reverse @oldinc) {
     next unless $path =~ /\//;
-    $path =~ s/^\/usr/\/usr\/lib\/MailScanner\/utils/;
+    $path =~ s/^\/usr/\/usr\/local\/lib\/MailScanner\/utils/;
     unshift @INC, $path;
   }
 
@@ -210,8 +210,6 @@ if ($Versions) {
   my($module, $s, $v, $m);
 
   printf("Running on\n%s", `uname -a`);
-  printf("This is %s", `cat /etc/redhat-release`)   if -f "/etc/redhat-release";
-  printf("This is %s", `head -1 /etc/SuSE-release`) if -f "/etc/SuSE-release";
   printf("This is Perl version %f (%vd)\n", $], $^V);
   print "\nThis is MailScanner version " . $MailScanner::Config::MailScannerVersion . "\n";
   print "Module versions are:\n";
@@ -281,7 +279,7 @@ if ($WantLintOnly || $WantLintLiteOnly) {
 # Find the mailscanner.conf file, with a default just in case.
 my $ConfFile = $ARGV[0];
 # Use the default if we couldn't find theirs. Will save a lot of grief.
-$ConfFile = '/opt/MailScanner/etc/MailScanner.conf' if $ConfFile eq "" ||
+$ConfFile = '%SYSCONFDIR%/MailScanner/MailScanner.conf' if $ConfFile eq "" ||
                                                        !(-f $ConfFile);
 # Tell ConfigSQL where the configuration file is. 
 $MailScanner::ConfigSQL::ConfFile = $ConfFile;
@@ -338,7 +336,7 @@ if (MailScanner::Config::QuickPeek($ConfFile, 'virussc
 Currently you are using no virus scanners.
 This is probably not what you want.
 
-In your /opt/MailScanner/etc/MailScanner.conf file, set
+In your %SYSCONFDIR%/MailScanner/MailScanner.conf file, set
     Virus Scanners = clamav
 Then download
     http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/install-Clam-SA.tar.gz
@@ -425,7 +423,7 @@ if ($WantLintOnly || $WantLintLiteOnly) {
   }
   my $cluid = MailScanner::Config::QuickPeek($ConfFile, 'runasuser');
   my $clgid = MailScanner::Config::QuickPeek($ConfFile, 'runasgroup');
-  my $clr = system("/opt/MailScanner/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
+  my $clr = system("%PREFIX%/bin/mailscanner_create_locks \"$lockdir\" \"$cluid\" \"$clgid\"");
   print STDERR "Error: Attempt to create locks in $lockdir failed!\n"
     if ($clr>>8) != 0;
 
@@ -722,7 +720,7 @@ if ($locksdir eq "" || $locksdir =~ /tmp$/i) {
   print STDERR "Please move your \"Lockfile Dir\" setting in MailScanner.conf.\n";
   print STDERR "It should point outside /tmp, preferably /var/spool/MailScanner/incoming/Locks\n";
 }
-my $cl = system("/opt/MailScanner/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
+my $cl = system("%PREFIX%/bin/mailscanner_create_locks \"$locksdir\" \"$uname\" \"$gname\"");
 print STDERR "Error: Attempt to create locks in $locksdir failed!\n"
  if ($cl>>8) != 0;
 
